{if isset($course_for_editing)}
    <fieldset>
        <legend><h3>Editar Matéria</h3></legend>
{/if}

<form {if isset($course_for_editing)} id="edit_course_form_{$course_for_editing->get_id()}"  onsubmit="return edit_course(this.id)" {else}id="new_course_form"  onsubmit="return save_new_course(this.id);"{/if}>
        <label for="course_title" class="l2">{__ t = "Título"}</label>
        <input type="text" class="course_title" name="course_title"  {if isset($course_for_editing)}value="{$course_for_editing->get_title()}"{/if} />
        <label for="course_code" class="l2">{__ t = "Código"}</label>
        <input type="text" class="course_code" name="course_code" {if isset($course_for_editing)}value="{$course_for_editing->get_code()}"{/if}/>
        <label for="course_credits" class="l2">{__ t = "Créditos"}</label>
        <input type="text" class="course_credits" name="course_credits" {if isset($course_for_editing)}value="{$course_for_editing->get_credits()}"{/if}/>
        {if isset($course_for_editing)}<input type="hidden" name="course_id" value="{$course_for_editing->get_id()}"/>{/if}
        <input type="submit" value="Salvar"/><br/>
 </form>
        
{if isset($course_for_editing)}
    </fieldset>
{/if}